package com.zzz.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.security.core.GrantedAuthority;

/**
 * @author Chunsheng.Zhang
 * @date 2021/5/11 9:42
 * @description : TODO
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class Permission implements GrantedAuthority {

    private Long id;
    private String code;
    private String url;
    private String desc;

    @Override
    public String getAuthority() {
        return this.code;
    }
}